JavaScript

A5.u.elementgetScrollParent Method

Syntax

A5.u.element.getScrollParent(element)

Arguments

elementelementstring

A pointer to a DOM element or the ID of an element.

Returns

elementelementboolean

The first scrollable parent element or false if the element does not have a scrollable parent.

Description

Gets the first parent element that scrolls starting from the element passed in.

Example

// assume "id" is the ID of a panel body, and the panel is scroll vertically 200 pixels and the scrollable content is 320 by 1600
var loc = A5.u.element.getScroll(id);
// loc = {top: 200, left: 0, width: 320, height: 1600}